package com.mallcloud.mall.admin.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.mallcloud.mall.common.core.model.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;

@ApiModel(value = "SysOauthClientDetails", description = "客户端信息")
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "sys_oauth_client_details", autoResultMap = true)
public class SysOauthClientDetails extends BaseModel {
	private static final long serialVersionUID = 1L;

	@TableId(value = "id", type = IdType.ASSIGN_ID)
	@ApiModelProperty(value = "id")
	private Long id;

	@NotBlank(message = "client_id 不能为空")
	@ApiModelProperty(value = "客户端id")
	private String clientId;

	@NotBlank(message = "client_secret 不能为空")
	@ApiModelProperty(value = "客户端密钥")
	private String clientSecret;

	@ApiModelProperty(value = "资源id列表")
	private String resourceIds;

	@NotBlank(message = "scope 不能为空")
	@ApiModelProperty(value = "作用域")
	private String scope;

	@ApiModelProperty(value = "授权方式")
	private String[] authorizedGrantTypes;

	@ApiModelProperty(value = "回调地址")
	private String webServerRedirectUri;

	@ApiModelProperty(value = "权限列表")
	private String authorities;

	@ApiModelProperty(value = "请求令牌有效时间")
	private Integer accessTokenValidity;

	@ApiModelProperty(value = "刷新令牌有效时间")
	private Integer refreshTokenValidity;

	@ApiModelProperty(value = "扩展信息")
	private String additionalInformation;

	@ApiModelProperty(value = "是否自动放行")
	private String autoapprove;

}
